<template>
	<view class="content">
		<u-navbar title="拼小了" height="88rpx" left-icon-color="#fff" :titleStyle='titleStyle' bg-color="#FF594D"
			:autoBack="true">
		</u-navbar>
		<top-line></top-line>

		<view class="grid">
			<view class="grid_content">
				<view class="grid_wrap">
					<template v-for="item in serveList">
						<view class="grid_item" @click="navigateTo(item.url)">
							<image :src="item.src" mode=""></image>
							{{item.text}}
						</view>
					</template>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				titleStyle: {
					color: '#fff',
				},

				serveList: [{
					text: '主产品开单',
					src: '../../static/images/spell-page/Frame@2x.png',
					url: '/pages/main-product/main-product'
				}, {
					text: '开单记录',
					src: '../../static/images/spell-page/Frame@2x (1).png',
					url: '/pages/billing-record/billing-record'
				}, {
					text: '退货记录',
					src: '../../static/images/spell-page/Frame@2x (2).png',
					url: '/pages/collect-page/collect-page'
				}, {
					text: '回款记录',
					src: '../../static/images/spell-page/Frame@2x (3).png',
					url: '/pages/buy-back/buy-back'
				}, {
					text: '会员管理',
					src: '../../static/images/spell-page/Frame@2x (4).png',
					url: '/pages/member-list/member-list'
				}, {
					text: '发展中客户',
					src: '../../static/images/spell-page/Frame@2x (5).png',
					url: '/pages/developing-client/developing-client'
				}, {
					text: '客户转移',
					src: '../../static/images/spell-page/Frame@2x (6).png',
					url: '/pages/customer-switching/customer-switching'
				}, {
					text: '发卡券',
					src: '../../static/images/spell-page/Frame@2x (7).png',
					url: '/pages/send-coupon/send-coupon'
				}, {
					text: '发红包',
					src: '../../static/images/spell-page/Frame@2x (8).png',
					url: '/pages/red-packet/red-packet'
				}, {
					text: '发积分',
					src: '../../static/images/spell-page/Frame@2x (9).png',
					url: '/pages/integral/integral'
				}, {
					text: '余额收款明细',
					src: '../../static/images/spell-page/Frame@2x (10).png',
					url: '/pages/balance-record/balance-record'
				}, ]
			}
		},
		methods: {
			navigateTo(url) {
				uni.navigateTo({
					url
				})
			}
		}
	}
</script>

<style lang="scss">
	.content {
		background-color: #f3f3f3;
		height: 100vh;
		// padding-bottom: 140rpx;
		// // #ifdef MP
		// padding-bottom: 260rpx;
		// // #endif

		.grid {
			background-color: #fff;
			margin-bottom: 20rpx;

			.grid_content {
				padding: 33rpx 30rpx 0;

				.grid_title {
					display: flex;
					padding: 0 7rpx 20rpx;
					justify-content: space-between;
					align-items: center;

					.grid_title_left {
						font-size: 26rpx;
						font-family: PingFang SC, PingFang SC;
						font-weight: 800;
						color: #000000;
					}

					.grid_title_right {
						font-size: 26rpx;
						font-family: PingFang SC, PingFang SC;
						font-weight: 500;
						color: #777777;
						display: flex;
						align-items: center;

						image {
							margin-left: 36rpx;
							width: 17rpx;
							height: 32rpx;
						}

					}
				}

				.grid_wrap {
					display: flex;
					flex-wrap: wrap;
					// justify-content: space-between;

					.grid_item {
						width: 126rpx;
						height: 114rpx;
						display: flex;
						flex-direction: column;
						justify-content: space-between;
						align-items: center;
						font-size: 26rpx;
						font-family: PingFang SC, PingFang SC;
						font-weight: 500;
						color: #777777;
						margin: 0 65rpx 42rpx 0;
						white-space: nowrap;
						position: relative;

						image {
							width: 68rpx;
							height: 68rpx;
						}

						.reminder {
							position: absolute;
							width: 39rpx;
							height: 28rpx;
							background-color: #FF2525;
							border-radius: 99rpx;
							font-size: 20rpx;
							font-family: PingFang SC, PingFang SC;
							font-weight: 800;
							color: #FFFFFF;
							text-align: center;
							line-height: 28rpx;
							right: 20rpx;
						}
					}

					.grid_item:nth-of-type(4n+0) {
						margin-right: 0;
					}
				}
			}
		}
	}
</style>